class conversion{ str: string; arr: string[]=null; read(str: string){ this.str=str; if(this.str==null) return "empty"; console.log("The input string is"); console.log(this.str); } display(){ console.log("The string is converted to array"); console.log("Converted string is"+this.convert(this.str)); console.log("After conversion switch string from Lowercase to uppercase"); console.log("After switching" + this.swap(this.str)); } convert(str: string) { var arr1: string[]; arr1 = this.str.split(''); return this.arr = arr1; } swap(str: string) { return this.str.toUpperCase(); } } var c=new conversion(); c.read("I am Sridhar working in Syncfusion Software"); c.display();